﻿using System.Collections.Generic;
using DataLayer.Repo;
using DataLayer.Types;
using StructureMap;

namespace ViewModel.Finance
{
    public class TheBudgetViewModel : ListViewModel<BudgetItem>
    {

        public ICollection<FrequencyItem> FrequencyItems
        {
            get { return ObjectFactory.GetInstance<IRepository<FrequencyItem>>().FindAll(); }
        }

        public BalanceType ExpenseType
        {
            get
            {
                return ObjectFactory.GetInstance<IRepository<BalanceType>>().GetByName("Expense");
            }
        }

        public BalanceType IncomeType
        {
            get
            {
                return ObjectFactory.GetInstance<IRepository<BalanceType>>().GetByName("Income");
            }
        }
    }
}
